<%@page import="com.szzg10.jsp.chapter7.Counter"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BasicCounter</title>
</head>
<body>
	<%! int count = 0; %>
	
	<%! 
	int doubleCount() {
		count *= 2;
		return count;
	}
	%>
	
	<%!
	public void jspInit() {
		ServletConfig sConfig = getServletConfig();
		String emailAddr = sConfig.getInitParameter("email");
		ServletContext ctx = getServletContext();
		ctx.setAttribute("mail", emailAddr);
	}
	%>
	
	The page count is now:
	<%= doubleCount() %>
</body>
</html>